package design.observer;

import java.util.ArrayList;
import java.util.List;
import java.util.Observer;

/**
 * 主程序
 *
 * @author wei.yang on 2018/8/31
 */
public class Main {

    public static void main(String[] args) {
        CustomerObservable observable = new CustomerObservable();
        Observer observer1 = new CustomerObserver();
        Observer observer2 = new CustomerObserver();
        List<Observer> observers=new ArrayList<>();
        observers.add(observer1);
        observers.add(observer2);
        observable.addObservers(observers);
        observable.setNotice("21323");
        observable.setNotice("213233");
    }
}
